#include<stdio.h>

#define ONE 0001

#define TWO 0002
#define THREE 0004

void func(int flags)
{
  if(flags & ONE) printf("flags has ONE!");

  if(flags & TWO) printf("flags has TWO!");
  if(flags & THREE) printf("flags has THREE!");

  printf("\n");
}

int main()
{
  func(ONE);

  func(TWO);
  func(THREE);
  func(ONE | TWO);

  func(ONE | THREE | TWO);
  return 0;
}
